From 2bf765ab4945daf2c97e25b9f15879860931e64e Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Sun, 4 Dec 2011 19:57:25 -0500 Subject: [PATCH] entry: avoid a mismatched cairo_save/restore Leftover from GtkIconHelper migration. --- gtk/gtkentry.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 9c41e0eb5e..436a868ad9 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -3374,14 +3374,9 @@ draw_icon (GtkWidget *widget, gint x, y, width, height, pix_width, pix_height; GtkStyleContext *context; - context = gtk_widget_get_style_context (widget); - if (!icon_info) return; - cairo_save (cr); - gtk_cairo_transform_to_window (cr, widget, icon_info->window); - width = gdk_window_get_width (icon_info->window); height = gdk_window_get_height (icon_info->window); @@ -3390,6 +3385,10 @@ draw_icon (GtkWidget *widget, if (width == 1 || height == 1) return; + cairo_save (cr); + gtk_cairo_transform_to_window (cr, widget, icon_info->window); + + context = gtk_widget_get_style_context (widget); gtk_entry_prepare_context_for_icon (entry, context, icon_pos); _gtk_icon_helper_get_size (icon_info->icon_helper, context, &pix_width, &pix_height); -- 2.30.2